/// 需要登录
class NeedLogin extends SunNetError {
  NeedLogin({int code: 401, String message: "请先登录"}) : super(code, message);
}

/// 需要授权
class NeedAuth extends SunNetError {
  NeedAuth(String message, {int code: 403, dynamic data})
      : super(code, message, data: data);
}

/// 网络异常
class SunNetError implements Exception {
  final int code;
  final String message;
  final dynamic data;

  SunNetError(this.code, this.message, {this.data});
}
